-- GENERATED SPELL FOR [Gruff] --


function spell0_6583(pUnit, Event) --@Chained Bolt,n/a--
pUnit:FullCastSpellOnTarget(15549,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_6583', 1800, 1)
end

function spell1_6583(pUnit, Event) --@Thunderclap,Self--
pUnit:FullCastSpellOnTarget(15548,pUnit)
pUnit:RegisterEvent('Sorts_6583', 10300, 1)
end

function Sorts_6583(pUnit, Event)
local choix_sorts_6583 = math.random(0, 1)
if choix_sorts_6583 == 0 then
pUnit:RegisterEvent('spell0_6583', 1, 1)
end
if choix_sorts_6583 == 1 then
pUnit:RegisterEvent('spell1_6583', 1, 1)
end
end

function mob6583_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_6583', math.random(1500, 3000), 1)
end

function mob6583_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob6583_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob6583_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(6583, 1, 'mob6583_Action')
RegisterUnitEvent(6583, 2, 'mob6583_Leave')
RegisterUnitEvent(6583, 3, 'mob6583_Kill')
RegisterUnitEvent(6583, 4, 'mob6583_Die')
